 <!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta http-equiv="X-UA-Compatible" content="ie=edge" />
	<link rel="icon" type="image/x-icon" href="/favicon.ico" th:href="@{/favicon.ico}" >
	<title>设备型号管理</title>
		
</head>
<body>
<!--头部-->
<header th:replace="common/head" >
</header> 
<!-- 页面指向 -->
<div class="page-point bg-white">
	<ul>
		<li>首页</li>
		<li>设备管理</li>
		<li>设备型号管理</li>
	</ul>
</div>
<!-- 菜单树 -->
<div th:replace="common/left" > 
</div>

<!-- 底部 -->
<div th:replace="common/foot" > 
</div>

<!--主体内容-->
<div class="page-container">

	<div class="container-fluid mb-20 clearfix">
		<div class="col-md-12">
			<h2 class="page-section-title">查询条件</h2>
		</div>
	</div>

	<div class="container-fluid query-frame-wrap mb-10 clearfix">
		<div class="col-lg-3">
			<div class="query-frame">
				<label>设备型号</label>
				<input autocomplete="new-password" type="text" class="form-control queryModelMange" id="emModel"/>
			</div>
		</div>
		<div class="col-lg-3">
			<div class="query-frame">
				<label>设备类别</label>
				<!-- <input autocomplete="new-password" type="text" class="form-control queryModelMange" id="emModelType"/> -->
				<select id="emModelType"  name="modelType" class="form-control queryModelMange">
						<option value="">全部</option>
                   		<option value="1">生产类</option>
                   		<option value="2">环境类</option>
                   		<option value="3">能源类</option>
                   		<option value="4">检测类</option>
                   		<option value="5">生产辅助类</option>
		        </select>
			</div>
		</div>
		<div class="col-lg-3 col-lg-offset-3">
			<div class="query-frame query-button">
				<img th:src="@{/image/search.png}" id="queryModel"/>
				<img th:src="@{/image/rest.png}" id="resetModel" class="reset"/>
			</div>
		</div>
	</div>

	<div class="container-fluid mb-20 clearfix">
		<div class="col-md-12 rlt">
			<h2 class="page-section-title">型号列表</h2>
			<ul class="table-tool">
			    <li id="addModel">
			        <span class="icon-list_add" aria-hidden="true"></span>
			        <label>新增</label>
			    </li>
			    <li id="updateModel">
			        <span class="icon-list_xiugai" aria-hidden="true"></span>
			        <label>修改</label>
			    </li>
			    
			    <li id="delModel">
			        <span class="icon-list_shanchu" aria-hidden="true" ></span>
			        <label>删除</label>
			    </li>
			    <li id="refreshModel" class="last">
			        <span class="icon-list_shuaxin" aria-hidden="true"></span>
			        <label>刷新</label>
			    </li>
			</ul>
		</div>
	</div>

	<div class="container-fluid table-container">
		<table id="modelTable">

		</table>
	</div>
</div>

<!--模态框-表单验证和文件上传-->
<div class="modal fade modelForm" id="myModal" tabindex="-1" role="dialog" data-backdrop="static" data-keyboard="false"
>
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title">Newly added</h4>
      </div>
      <div class="modal-body">
		    <div class="row">
		        <div class="col-lg-12">
		            <form id="defaultForm" method="post" class="form-horizontal modelFormTable" action="">
		                <div class="form-group">
		                    <label class="col-lg-3 control-label form-required form-required-4">设备型号</label>
		                    <div class="col-lg-7">
		                    	<input autocomplete="new-password" type="text" class="form-control" name="modelCode" value="" />
		                    </div>
		                </div>
		                <div class="form-group">
		                    <label class="col-lg-3 control-label form-required form-required-4">设备类别</label>
		                    <div class="col-lg-7">
		                    	<!-- <input autocomplete="new-password" type="text" class="form-control" name="" value="" /> -->
		                    	<select name="modelType" class="form-control modelType">
		                    		<option value="1">生产类</option>
		                    		<option value="2">环境类</option>
		                    		<option value="3">能源类</option>
		                    		<option value="4">检测类</option>
		                    		<option value="5">生产辅助类</option>
		                    	</select>
		                    </div>
		                </div>
		                <div class="form-group">
		                    <label class="col-lg-3 control-label form-required form-required-7">设备采集器型号</label>
		                    <div class="col-lg-7">
		                    	<input autocomplete="new-password" type="text" class="form-control" name="code" value="" />
		                    </div>
		                </div>
		                <div class="form-group">
		                    <label class="col-lg-3 control-label form-required form-required-3">供应商</label>
		                    <div class="col-lg-7">
		                    	<input autocomplete="new-password" type="text" class="form-control" name="supplier" value="" />
		                    </div>
		                </div>
		                <div class="form-group operationDiv">
		                    <label class="col-lg-3 control-label operationLable form-required form-required-4">所属工序</label>
		                    <div class="col-lg-7">
		                    	<select name="operationId" class="form-control operation" multiple>
		                    		<option value="">请选择</option>
		                    	</select>
		                    </div>
		                </div>
		                <!-- 
		                <div class="form-group">
		                    <label class="col-lg-3 control-label">采集方式</label>
		                    <div class="col-lg-7 collection-mode">
		                    	<label><input autocomplete="new-password" type="checkbox" name="plcType" value="1" /><span>PLC</span></label>
		                    	<label><input autocomplete="new-password" type="checkbox" name="fileType"  value="2" /><span>文件</span></label>
		                    	<label><input autocomplete="new-password" type="checkbox" name="databaseType"  value="3" /><span>数据库</span></label>
		                    	<label><input autocomplete="new-password" type="checkbox"  name="upperType"  value="4" /><span>上位机</span></label>
		                    </div>
		                </div>
		                 -->
		                
             		<!-- 隐藏唯一id -->
					<input autocomplete="new-password" type="hidden" name="pkId" id="pkId" value="" />
					<input autocomplete="new-password" type="hidden" name="collectionType" value="" />
		            </form>
		        </div>
		    </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-primary yes">保存</button>
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
      </div>
    </div>
  </div>
</div>

<div class="modal fade modelForm" id="myModal_MQ" tabindex="-1" role="dialog" data-backdrop="static" data-keyboard="false"
>
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title">MQ配置</h4>
      </div>
	     <div class="modal-body">
		<div class="content-box-MQ">

			<img class="add-row" data-modelId='' th:src="@{/image/add-row.png}" src="../../static/image/add-row.png" />
		</div>
	</div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary" id="mqSave">保存</button>
      </div>
    </div>
  </div>
</div>




<script th:src="@{/js/equipment/register/modelMange/modelMange.js}" src="../../static/js/equipment/register/modelMange/modelMange.js"></script>
<script th:src="@{/3thExt/template-web.js}" src="../../static/3thExt/template-web.js"></script>	

<script id="test" type="text/html">
{{each data as value index}} 
			<div class="item-list">
					<div class="error-tips-1" style="position: absolute;top: 30px;left: 320px;color: red;font-size: 12px;display:none">队列名称和可选参数不能为空！！！</div>
					<div class="top">
						<div class="l-box">
							<label><span>*</span>队列名称</label>
							<input autocomplete="new-password" type="text" name="mqName" class="mqName" value="{{value.name}}" />
						</div>
						<div class="r-box">
							<label><input autocomplete="new-password" class="selectAll" type="checkbox" />全选</label>
							<img class="del-row" th:src="@{/image/del-row.png}" src="/linkdcs/image/del-row.png"/>
						</div>
					</div>

					<div class="bottom">
						{{each value.data as value1 index1}}
						<label title="{{value1.name}}"><input autocomplete="new-password" class="paramCheck" name="typecheck" type="checkbox" value="{{value1.pkId}}" {{if value1.isSelected}}checked="checked"{{/if}} />{{value1.name}}</label>
						{{/each}}
					</div>
				
			</div>
{{/each}}


</script> 
<script id="checkType" type="text/html">
<div class="form-group checkTypeGroup">
  <label class="col-lg-3 control-label form-required form-required-4">采集方式</label>
      <div class="col-lg-7 collection-mode">
      	<label><input autocomplete="new-password" name="plcType" type="checkbox" value="1"><span>PLC</span></label>
      	<label><input autocomplete="new-password" name="fileType" type="checkbox" value="2"><span>文件</span></label>
      	<label><input autocomplete="new-password" name="databaseType" type="checkbox" value="3"><span>数据库</span></label>
      	<label><input autocomplete="new-password" name="upperType" type="checkbox" value="4"><span>上位机</span></label>
		<div class="error-tips" style="color: red;display:none;position: absolute; top: 25px">采集方式至少选择一个！！！</div>
      </div>
		
  </div>
</script>


</body>
</html>